package com.wjerp.tplus.server.common.model;

import com.wjerp.tplus.server.common.utils.RSAUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author lishuailei
 */
@ToString
@Getter
@Setter
public class PasswordResetVcodeWrapper {
    private String token;
    private String mobile;
    private String password;
    private String vcode;

    public String getPassword() {
        if(password != null && !password.isEmpty()){
            try {
                password = new String(RSAUtils.decryptByPrivateKey(password));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return password;
    }


}
